// 聊天相关的API请求方法

import request from './request';

// 获取聊天记录
export const getChatHistory = (chatId) => {
    return request({
        url: `/api/chat/history/${chatId}`,
        method: 'get'
    });
};

// 发送消息
export const sendMessage = (data) => {
    return request({
        url: '/api/chat/send',
        method: 'post',
        data
    });
};

// 获取聊天列表
export const getChatList = () => {
    return request({
        url: '/api/chat/list',
        method: 'get'
    });
};